<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<script src="${pageContext.request.contextPath}/dwz/js/dwz.regional.zh.js" type="text/javascript"></script>
<script src="${pageContext.request.contextPath}/dwz/js/dwz.validate.method.js" type="text/javascript"></script>
<div class="pageContent">
	<form action="notice_edit.action"
		class="pageForm required-validate"
		onsubmit="return validateCallback(this, navTabAjaxDone);"
		method="post">
		<input type="hidden" name="uuid" value="${uuid }">
		<div class="pageFormContent nowrap" layoutH="56">
			<dl>
				<dt>
					<label>类型：</label>
				</dt>
				<dd>
					<select name="type" class="required combox" id="type"
					ref="subclass_edit" refUrl="notice_getSubclass.action?noticeType={value}">
						<option value="">---请选择---</option>
						<option ${type eq '1'?"selected":""} value="1" >系统通知</option>
						<option ${type eq '2'?"selected":""} value="2">代办事项</option>
						<option ${type eq '3'?"selected":""} value="3">系统提醒</option>
					</select>
				</dd>
			</dl>
			<dl>
				<dt>
					<label>子类：</label>
				</dt>
				<dd>
					<select name="subclass" class="required combox" id="subclass_edit">
						<option value="">---请选择---</option>
						<c:choose>
				<c:when test="${type eq '1' && subclass eq '1'}">
					<option  value="1" selected>系统通知</option>
					</c:when>
					<c:when test="${type eq '2' && subclass eq '1'}">
					<option  value="1" selected>补卡流程</option>
				</c:when>
				<c:when test="${type eq '3' && subclass eq '1'}">
					<option  value="1" selected>快递通知</option>
				</c:when>
				</c:choose>
					</select>
				</dd>
			</dl>
			<dl>
				<dt>
					<label>接收人：</label>
				</dt>
				<dd>
				<input type="radio" name="recUser" id="edit_ru_all" class="required" value="all" onclick="tocheck_()"/>全部
				<input type="radio" name="recUser" id="edit_ru_dept" class="required" value="dept" onclick="tocheck_()"/>部门
				<input type="radio" name="recUser" id="edit_ru_person" class="required" value="person" onclick="tocheck_()"/>个人 
				<div id="edit_all_checked" style="display:none;">
					<input type="hidden" name="ruserone" value=""/>
				</div>
				
				<div id="edit_dept_checked" style="display:none;">
							<select name="rusertwo" class="combox">
								<option value="">---请选择---</option>
								<c:forEach items="${departmentList}" var="dept">
									<option value="${dept.deptCode}">${dept.deptName}</option>
								</c:forEach>
							</select>
				</div>
				
				<div id="edit_person_checked" style="display:none;">
					<select name="edit_not_dept" id="edit_not_dept" class="combox"
					ref="edit_not_recUser" refUrl="notice_getInsideUserByDept.action?deptCode={value}">
							<option value="">---请选择---</option>
							<c:forEach items="${departmentList}" var="dept">
								<option value="${dept.deptCode}">${dept.deptName}</option>
							</c:forEach>
					</select>
					
					<select name="ruserthree" id="edit_not_recUser"
							class="combox">
							<option value="">---请选择---</option>
					</select>
				</div>
				</dd>
			</dl>
			<dl>
				<dt>
					<label>标题：</label>
				</dt>
				<dd>
					<input name="title" class="required" type="text" size="40px"
						maxlength="100" value="${title}" />
				</dd>
			</dl>
			<dl>
				<dt>
					<label>内容：</label>
				</dt>
				<dd>
					<%-- <textarea name="content" class="required" maxlength="500" rows="8" cols="50">${content}</textarea> --%>
					<textarea class="editor required" name="content" rows="8" cols="100"  maxlength="500"
								upImgUrl="upload.php" upImgExt="jpg,jpeg,gif,png" tools="simple"
								>${content}</textarea>
				</dd>
			</dl>

		</div>
		<div class="formBar">
			<ul>
				<li><div class="buttonActive">
						<div class="buttonContent">
							<button type="submit">保存</button>
						</div>
					</div></li>
				<li>
					<div class="button">
						<div class="buttonContent">
							<button type="button" class="close">取消</button>
						</div>
					</div>
				</li>
			</ul>
		</div>
		<%-- <input type="hidden" value="${csrfToken}" name="CSRFToken"> --%>
	</form>
</div>
<script type="text/javascript">
	function tocheck_(){
		
		if($("#edit_ru_all").attr("checked")){
			$("#edit_all_checked").show(); 
			$("#edit_dept_checked").hide();
			$("#edit_person_checked").hide();
		}
		if($("#edit_ru_dept").attr("checked")){
			$("#edit_all_checked").hide(); 
			$("#edit_dept_checked").show();
			$("#edit_person_checked").hide();
		}
		if($("#edit_ru_person").attr("checked")){
			$("#edit_all_checked").hide(); 
			$("#edit_dept_checked").hide();
			$("#edit_person_checked").show();
		}
	}
</script>